using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for MATHANGKHUYENMAI.
     /// </summary>
     public class MATHANGKHUYENMAI
    {
              private Int32 _MAMATHANG;
      private Int32 _MAMATHANGKHUYENMAI;
      private decimal _SOLUONGMATHANGQUYDOI;
      private decimal _SOLUONGSI;
      private decimal _SOLUONGLE;
      private decimal _TIENKHUYENMAI;
      private decimal _TONGTIENKHUYENMAI;
      private bool _ISUSE;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMAMATHANGNullable
      { get { return false;  } }
      public Int32 MAMATHANG
      {
         get { return _MAMATHANG; }
         set { _MAMATHANG = value; }
      }
      public bool IsMAMATHANGKHUYENMAINullable
      { get { return false;  } }
      public Int32 MAMATHANGKHUYENMAI
      {
         get { return _MAMATHANGKHUYENMAI; }
         set { _MAMATHANGKHUYENMAI = value; }
      }
      public bool IsSOLUONGMATHANGQUYDOINullable
      { get { return true;  } }
      public decimal SOLUONGMATHANGQUYDOI
      {
         get { return _SOLUONGMATHANGQUYDOI;  }
         set { _SOLUONGMATHANGQUYDOI = value; }
      }
      public bool IsSOLUONGSINullable
      { get { return true;  } }
      public decimal SOLUONGSI
      {
         get { return _SOLUONGSI;  }
         set { _SOLUONGSI = value; }
      }
      public bool IsSOLUONGLENullable
      { get { return true;  } }
      public decimal SOLUONGLE
      {
         get { return _SOLUONGLE;  }
         set { _SOLUONGLE = value; }
      }
      public bool IsTIENKHUYENMAINullable
      { get { return true;  } }
      public decimal TIENKHUYENMAI
      {
         get { return _TIENKHUYENMAI;  }
         set { _TIENKHUYENMAI = value; }
      }
      public bool IsTONGTIENKHUYENMAINullable
      { get { return true;  } }
      public decimal TONGTIENKHUYENMAI
      {
         get { return _TONGTIENKHUYENMAI;  }
         set { _TONGTIENKHUYENMAI = value; }
      }
      public bool IsISUSENullable
      { get { return true;  } }
      public bool ISUSE
      {
         get { return _ISUSE;  }
         set { _ISUSE = value; }
      }

        #endregion

        #region Constructors
        public MATHANGKHUYENMAI()
        {
            Reset();
        }
        public MATHANGKHUYENMAI(MATHANGKHUYENMAI obj)
        {
            	this._MAMATHANG = obj.MAMATHANG;
	this._MAMATHANGKHUYENMAI = obj.MAMATHANGKHUYENMAI;
	this._SOLUONGMATHANGQUYDOI = obj.SOLUONGMATHANGQUYDOI;
	this._SOLUONGSI = obj.SOLUONGSI;
	this._SOLUONGLE = obj.SOLUONGLE;
	this._TIENKHUYENMAI = obj.TIENKHUYENMAI;
	this._TONGTIENKHUYENMAI = obj.TONGTIENKHUYENMAI;
	this._ISUSE = obj.ISUSE;
        }
        #endregion

        public void Reset()
        {
                     _MAMATHANG = EmptyValues.v_Int32;
         _MAMATHANGKHUYENMAI = EmptyValues.v_Int32;
         _SOLUONGMATHANGQUYDOI = EmptyValues.v_decimal;
         _SOLUONGSI = EmptyValues.v_decimal;
         _SOLUONGLE = EmptyValues.v_decimal;
         _TIENKHUYENMAI = EmptyValues.v_decimal;
         _TONGTIENKHUYENMAI = EmptyValues.v_decimal;
         _ISUSE = EmptyValues.v_bool;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MAMATHANG"] is DBNull))
		{
			obj.MAMATHANG = (Int32)reader["MAMATHANG"];
		}
                if(!(reader["MAMATHANGKHUYENMAI"] is DBNull))
		{
			obj.MAMATHANGKHUYENMAI = (Int32)reader["MAMATHANGKHUYENMAI"];
		}
                if(!(reader["SOLUONGMATHANGQUYDOI"] is DBNull))
		{
			obj.SOLUONGMATHANGQUYDOI = (decimal)reader["SOLUONGMATHANGQUYDOI"];
		}
                if(!(reader["SOLUONGSI"] is DBNull))
		{
			obj.SOLUONGSI = (decimal)reader["SOLUONGSI"];
		}
                if(!(reader["SOLUONGLE"] is DBNull))
		{
			obj.SOLUONGLE = (decimal)reader["SOLUONGLE"];
		}
                if(!(reader["TIENKHUYENMAI"] is DBNull))
		{
			obj.TIENKHUYENMAI = (decimal)reader["TIENKHUYENMAI"];
		}
                if(!(reader["TONGTIENKHUYENMAI"] is DBNull))
		{
			obj.TONGTIENKHUYENMAI = (decimal)reader["TONGTIENKHUYENMAI"];
		}
                if(!(reader["ISUSE"] is DBNull))
		{
			obj.ISUSE = (bool)reader["ISUSE"];
		}
//            _MAMATHANG = (reader["MAMATHANG"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAMATHANG"];
//            _MAMATHANGKHUYENMAI = (reader["MAMATHANGKHUYENMAI"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAMATHANGKHUYENMAI"];
//            _SOLUONGMATHANGQUYDOI = (reader["SOLUONGMATHANGQUYDOI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOLUONGMATHANGQUYDOI"];
//            _SOLUONGSI = (reader["SOLUONGSI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOLUONGSI"];
//            _SOLUONGLE = (reader["SOLUONGLE"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOLUONGLE"];
//            _TIENKHUYENMAI = (reader["TIENKHUYENMAI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TIENKHUYENMAI"];
//            _TONGTIENKHUYENMAI = (reader["TONGTIENKHUYENMAI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TONGTIENKHUYENMAI"];
//            _ISUSE = (reader["ISUSE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISUSE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MAMATHANG, Int32 MAMATHANGKHUYENMAI, decimal SOLUONGMATHANGQUYDOI, decimal SOLUONGSI, decimal SOLUONGLE, decimal TIENKHUYENMAI, decimal TONGTIENKHUYENMAI, bool ISUSE)
        {
                     this._MAMATHANG = MAMATHANG;
         this._MAMATHANGKHUYENMAI = MAMATHANGKHUYENMAI;
         this._SOLUONGMATHANGQUYDOI = SOLUONGMATHANGQUYDOI;
         this._SOLUONGSI = SOLUONGSI;
         this._SOLUONGLE = SOLUONGLE;
         this._TIENKHUYENMAI = TIENKHUYENMAI;
         this._TONGTIENKHUYENMAI = TONGTIENKHUYENMAI;
         this._ISUSE = ISUSE;
        }
    }
}